/**     
 * @Title: DemoSubscriber.java   
 * @Package me.xxy.mq.client   
 * @Description: TODO
 * @author weiwei 
 * @date 2018年6月1日 下午3:07:33   
 * @version V1.0     
 */
package me.xxy.mq.client;

import me.xxy.mq.core.AbstractMessageHandler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @ClassName: DemoSubscriber
 * @Description: TODO
 * @author weiwei
 * @date 2018年6月1日 下午3:07:33
 * 
 */
@Service
public class DemoMessageHandler extends AbstractMessageHandler<DemoMessage> {
	
	private static final Logger LOG = LoggerFactory.getLogger(DemoMessageHandler.class);

	public static final String DEMO_MESSAGE_KEY = "DEMO_MESSAGE";

	public DemoMessageHandler() {
		super(DEMO_MESSAGE_KEY, DemoMessage.class);
	}

	public DemoMessageHandler(String messageType) {
		super(messageType, DemoMessage.class);
	}

	public DemoMessageHandler(String messageType, Class<DemoMessage> clazz) {
		super(messageType, clazz);
	}

	@Override
	public void handle(DemoMessage msg) {
		LOG.info("handle DemoMessage >> {}", msg);
	}

	@Override
	public void handleFailed(DemoMessage msg) {
		LOG.info("handleFailed DemoMessage >> {}", msg);
	}
}
